package com.anxin.osbProinstInfor.web;

import java.util.List;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.anxin.framework.aspectj.lang.annotation.Log;
import com.anxin.framework.aspectj.lang.enums.BusinessType;
import com.anxin.osbProinstInfor.entity.OsbProinstInfor;
import com.anxin.osbProinstInfor.service.OsbProinstInforService;
import com.anxin.framework.web.controller.BaseController;
import com.anxin.framework.web.entity.AjaxResult;
import com.anxin.common.utils.poi.ExcelUtil;
import com.anxin.framework.web.page.TableDataInfo;

/**
 * 流程返回信息表Controller
 *
 * @author jbs
 * @date 2024-03-08
 */
//@Api(tags = "流程返回信息表" )
@RestController
@RequestMapping("/osbProinstInfor/osbProinstInfor")
public class OsbProinstInforController extends BaseController{
    @Autowired
    private OsbProinstInforService osbProinstInforService;

    /**
     * 查询流程返回信息表列表
     */
    //@ApiOperation(value="查询流程返回信息表列表" ,notes="作者:jbs")
    @PreAuthorize("@ss.hasPermi('osbProinstInfor:osbProinstInfor:view')")
    @GetMapping("/list")
    @Log(title = "查询流程返回信息表列表", businessType = BusinessType.LIST)
    public TableDataInfo<List<OsbProinstInfor>> list(OsbProinstInfor osbProinstInfor){
        startPage();
        List<OsbProinstInfor> list = osbProinstInforService.findList(osbProinstInfor);
        return getDataTable(list);
    }

    /**
     * 导出流程返回信息表列表
     */
    //@ApiOperation(value="导出流程返回信息表列表",notes="作者:jbs")
    @PreAuthorize("@ss.hasPermi('osbProinstInfor:osbProinstInfor:export')")
    @Log(title = "流程返回信息表", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(OsbProinstInfor osbProinstInfor) {
        List<OsbProinstInfor> list = osbProinstInforService.findList(osbProinstInfor);
        ExcelUtil<OsbProinstInfor> util = new ExcelUtil<OsbProinstInfor>(OsbProinstInfor.class);
        return util.exportExcel(list, "osbProinstInfor");
    }

    /**
     * 获取流程返回信息表详细信息
     */
    //@ApiOperation(value="获取流程返回信息表详细信息",notes="作者:jbs")
    @PreAuthorize("@ss.hasPermi('osbProinstInfor:osbProinstInfor:view')")
    @GetMapping(value = "/{id}")
    @Log(title = "获取流程返回信息表详细信息", businessType = BusinessType.LIST)
    public AjaxResult<OsbProinstInfor> getInfo(@PathVariable("id") String id){
        return AjaxResult.success(osbProinstInforService.getById(id));
    }

    /**
     * 保存流程返回信息表
     */
    //@ApiOperation(value="保存流程返回信息表",notes="作者:jbs")
    @PreAuthorize("@ss.hasPermi('osbProinstInfor:osbProinstInfor:edit')")
    @Log(title = "流程返回信息表", businessType = BusinessType.INSERT)
    @PostMapping("/save")
    public AjaxResult save(@RequestBody OsbProinstInfor osbProinstInfor){
        osbProinstInforService.save(osbProinstInfor);
        return AjaxResult.success(osbProinstInfor);
    }


    /**
     * 删除流程返回信息表
     */
    //@ApiOperation(value="删除流程返回信息表",notes="作者:jbs")
    @PreAuthorize("@ss.hasPermi('osbProinstInfor:osbProinstInfor:remove')")
    @Log(title = "流程返回信息表", businessType = BusinessType.DELETE)
	@DeleteMapping("/{id}")
    public AjaxResult delete(@PathVariable(("id")) String id){
        return toAjax(osbProinstInforService.deleteById(id));
    }
}
